package cn.kgc.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * @author YC
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "roles")
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public class Roles extends Model<Roles> implements Serializable {

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 角色名称
     */
    @TableField(value = "role_name")
    private String roleName;


    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;


    /**
     * 乐观锁
     */
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private int version;


    /**
     * 创时间
     */
    @TableField(value = "creationDate", fill = FieldFill.INSERT)
    @JsonIgnore
    private Date creationDate;


    /**
     * 修改时间
     */
    @TableField(value = "modifyDate", fill = FieldFill.UPDATE)
    @JsonIgnore
    private Date modifyDate;


}
